﻿(function(E, T, $){
var selection = E.mod('Selection'),
	testName = 'FontSize',
	title = '字号',
	setValue = ['设置字体大小','12px','14px','18px','24px','36px'],
	dom = null,
	node = null,
	cmds = [
		[1500, {fun: function() {
			dom = E.get('document');
			dom.body.innerHTML = '<span id="_testFontsize">'+setValue.join(',')+'</span>';
			node = dom.getElementById('_testFontsize');
			selection.selectNode(node, true);
			selection.selectedText(setValue[0]);
		}}],
		[500,{name : '#demo-FontSize', type: 'mouseover'}],
		[500,{name : '#demo-FontSize span.FontSize', type: 'click'}],
		[10, {fun: function() {
			selection.selectedText(setValue[1]);
		}}],
		[500,{name : '#demo-FontSize', type: 'mouseover'}],
		[500,{name : '#demo-FontSize a.jqe-button-menu', type: 'click'}],
		[500, {fun: function() {
			$(".jqe-plugin-fontsize a").removeClass('jqe-panel-a-hover');
			$(".jqe-plugin-fontsize a[size=3]").addClass('jqe-panel-a-hover');
		}}],
		[1000,{name : '.jqe-plugin-fontsize a[size=3]', type: 'click'}],
		[10, {fun: function() {
			selection.selectedText(setValue[2]);
		}}],
		[500,{name : '#demo-FontSize', type: 'mouseover'}],
		[500,{name : '#demo-FontSize a.jqe-button-menu', type: 'click'}],
		[500, {fun: function() {
			$(".jqe-plugin-fontsize a").removeClass('jqe-panel-a-hover');
			$(".jqe-plugin-fontsize a[size=4]").addClass('jqe-panel-a-hover');
		}}],
		[1000,{name : '.jqe-plugin-fontsize a[size=4]', type: 'click'}],
		[10, {fun: function() {
			selection.selectedText(setValue[3]);
		}}],
		[500,{name : '#demo-FontSize', type: 'mouseover'}],
		[500,{name : '#demo-FontSize a.jqe-button-menu', type: 'click'}],
		[500, {fun: function() {
			$(".jqe-plugin-fontsize a").removeClass('jqe-panel-a-hover');
			$(".jqe-plugin-fontsize a[size=5]").addClass('jqe-panel-a-hover');
		}}],
		[1000,{name : '.jqe-plugin-fontsize a[size=5]', type: 'click'}],
		[10, {fun: function() {
			selection.selectedText(setValue[4]);
		}}],
		[500,{name : '#demo-FontSize', type: 'mouseover'}],
		[500,{name : '#demo-FontSize a.jqe-button-menu', type: 'click'}],
		[500, {fun: function() {
			$(".jqe-plugin-fontsize a").removeClass('jqe-panel-a-hover');
			$(".jqe-plugin-fontsize a[size=6]").addClass('jqe-panel-a-hover');
		}}],
		[1000,{name : '.jqe-plugin-fontsize a[size=6]', type: 'click'}],
		[10, {fun: function() {
			selection.selectedText(setValue[5]);
		}}],
		[500,{name : '#demo-FontSize', type: 'mouseover'}],
		[500,{name : '#demo-FontSize a.jqe-button-menu', type: 'click'}],
		[500, {fun: function() {
			$(".jqe-plugin-fontsize a").removeClass('jqe-panel-a-hover');
			$(".jqe-plugin-fontsize a[size=7]").addClass('jqe-panel-a-hover');
		}}],
		[1000,{name : '.jqe-plugin-fontsize a[size=7]', type: 'click'}]
	];

T.addTest(testName, cmds, title);
})(jQEditor,AutoTest, jQuery)